namespace _7_类练习;

public class Animal
{
    private string name;
    private int age;
    private string gender;

    public void SetName(string name)
    {
        this.name = name;
    }

    public void SetAge(int age)
    {
        this.age = age;
    }

    public void SetGender(string gender)
    {
        this.gender = gender;
    }

    public void introduce()
    {
        Console.WriteLine($"我的名字叫：{this.name}，我今年{this.age}岁，我的性别是{this.gender}");
    }
}

public class AnimalTest
{
    public static void Main(string[] args)
    {
        Animal animal = new Animal();
        animal.SetName("小猫");
        animal.SetAge(10);
        animal.SetGender("男");
        animal.introduce();
    }
}